{% extends "base.html" %}
{% block title %}Book room{% endblock %}
{% block content %}
{% if errors %}
{{ errors }}
{% endif %}
<table class="table table-striped">
    <thead>
        <th>logo</th>
        <th>Company Name</th>
        <th>room type</th>
        <th>Price per night</th>
        <th>From</th>
        <th>To</th>
        <th>No. of Rooms</th>
        <th>Book Now</th>
    </thead>
    {% for offer in offers %}
    <form action="/myhotel/hotel/{{offer.hotel.id}}/book/{{offer.id}}/" method="post">
        {% csrf_token %}
        <tr>
            <td width="10%"><img src="/media/{{offer.company.companyImage}}"></td>
            <td>{{offer.company.companyName}}</td>
            <td>{{offer.roomType}}</td>
            <td>{{offer.price}}</td>
            <td><input type="date" name="start"></td>
            <td><input type="date" name="end"></td>
            <td><input type="text" name="number"></td>
            <td><button class="btn btn-success btn-lg" type="submit">Book</button></td>
        </tr>
    </form>
    {% endfor %}

</table>

{% endblock %}
